<!--
    This Source Code Form is subject to the terms of the Mozilla Public
    License, v. 2.0. If a copy of the MPL was not distributed with this
    file, You can obtain one at http://mozilla.org/MPL/2.0/.
-->

<!--
    Copyright (c) 2014, Joyent, Inc.
-->

<div class="rule {{#unless enabled}}disabled{{/unless}}">
  {{#if global}}
  <div class="global"><i class="fa fa-globe"></i> GLOBAL</div>
  {{/if}}
  <div class="from-predicate">{{fromPredicate}}</div>
  <div class="to">
    <i class="fa fa-long-arrow-right"></i>
  </div>

  <div class="to-predicate">{{toPredicate}}</div>

  <div class="action {{action}}">{{action}}</div>
  <div class="action-predicate">{{actionPredicate}}</div>
</div>

{{#role "operators"}}
<div class="actions">
  <a class="btn edit-rule"><i class="fa fa-pencil"></i> Modify</a>
  {{#if enabled}}
  <a class="btn disable-rule"><i class="fa fa-times"></i> Disable</a>
  {{else}}
  <a class="btn enable-rule"><i class="fa fa-ok-sign"></i> Enable</a>
  {{/if}}
  <a class="btn delete-rule"><i class="fa fa-trash-o"></i></a>
</div>
{{/role}}
